{% extends 'base.html' %}
{% block head %}
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ studentInfo.StudentName }}的志愿列表</title>
    <link rel="icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css">
{% endblock %}
{% block content %}
<div class="studentInfo">
        <div class="tab ">
            <p> <b>{{ studentInfo.StudentName }}</b> 的志愿列表，生源校为 <b>{{studentInfo.SchoolName}}</b>， 分数为 <b>{{ studentInfo.StudentScore }}分</b> </p>
            <button type="submit" id="confirm-btn" onclick='confirm(1)'>确认填报志愿</button>
        </div>
</div>
<div class="tabs-container">
    <div class="tab" id="tab-1" onclick="showTable(1)">全部学校</div>
    <div class="tab" id="tab-2" onclick="showTable(2)">全市可选择学校</div>
    <div class="tab" id="tab-5" onclick="showTable(5)">未央区可选择学校</div>
    <div class="tab" id="tab-4" style="background-color: #007BFF; color: #ffffff" onclick="showTable(4)">未央区推荐志愿</div>
    <div class="tab" id="tab-3" onclick="showTable(3)">全市推荐志愿</div>

</div>
<div class="color-legend">
    <div>
	    <div class="tab Far-legend" title="比考生分高20分以上"></div><br>心向往之
    </div>
    <div>
        <div class="tab Up-legend" title="比考生分高10~20分"></div><br>奋力一搏
    </div>
    <div>
	    <div class="tab Optimal-legend" title="比考生分高0~10分"></div><br>曙光已现
    </div>
    <div>
        <div class="tab Befit-legend" title="比考生分低0~10分"></div><br>恰如其分
    </div>
    <div>
         <div class="tab Down-legend" title="比考生分低10~20分"></div><br>有备无患
    </div>
    <div>
        <div class="tab TooLow-legend" title="比考生分低20~60分"></div><br>以防万一
    </div>
</div>

<div class="table-containers">
    <div class="table-container hidden" id="table-container-1">
    <table class="schoolListTable">
        <thead>
                <th>学校代码</th>
                <th>学校名称</th>
                <th>学校预估线(校方评估)</th>
                <th>学校预估线(算法评估)</th>
                <th>学校类型</th>
                <th>学校级别</th>
                <th>学校区县</th>
                <th>学校地址</th>
            
        </thead>
        <tbody>
            {% for scode,sname,sprescore1,sprescore2,stype,slevel,sarea,saddress,sLat,sLng in School_ALL %}
            <tr>
                <td>{{ scode }}</td>
                <td>{{ sname }}</td>
                <td>{{ sprescore1 }}</td>
                <td>{{ sprescore2 }}</td>
                <td>{{ stype }}</td>
                <td>{{ slevel }}</td>
                <td>{{ sarea }}</td>
                <td><a href="https://uri.amap.com/marker?position={{sLng}},{{sLat}}&name={{sname}}&coordinate=gaode&callnative=0" target="_blank">{{saddress}}</a></td>

            </tr>
            {% endfor %}
        </tbody>
        </table>
    </div>
    <div class="table-container hidden" id="table-container-2">
    <table class="schoolListTable">
        <thead>

                <th>学校代码</th>
                <th>学校名称</th>
                <th>学校预估线(校方评估)</th>
                <th>学校预估线(算法评估)</th>
                <th>学校类型</th>
                <th>学校级别</th>
                <th>学校区县</th>
                <th>学校地址</th>

        </thead>
        <tbody>
            {% for key,value in ByAverage_All.items() %}
             {% for schools in value %}
            <tr class="{{ key }}">
                 {% for info in schools[:-3] %}
                    <td>{{ info }}</td>
                {% endfor %}
                <td><a href="https://uri.amap.com/marker?position={{schools[-1]}},{{schools[-2]}}&name={{schools[1]}}&coordinate=gaode&callnative=0" target="_blank">{{schools[-3]}}</a></td>

            </tr>
            {% endfor %}
           {% endfor %}
        </tbody>
        </table>
    </div>
    <div class="table-container hidden" id="table-container-3">
    <table class="schoolListTable">
        <thead>

                <th>学校代码</th>
                <th>学校名称</th>
                <th>学校预估线(校方评估)</th>
                <th>学校预估线(算法评估)</th>
                <th>学校类型</th>
                <th>学校级别</th>
                <th>学校区县</th>
                <th>学校地址</th>

        </thead>
        <tbody>


                {% for key,value in ByAverage_Select.items() %}
                <tr class="{{ key }}">
                    {% for info in value[:-3] %}
                    <td>{{ info }}</td>
                    {% endfor %}
                    <td><a href="https://uri.amap.com/marker?position={{value[-1]}},{{value[-2]}}&name={{value[1]}}&coordinate=gaode&callnative=0" target="_blank">{{value[-3]}}</a></td>
                </tr>
                {% endfor %}

        </tbody>
        </table>
    </div>
    <div class="table-container " id="table-container-4">
    <table id="data-table" class="schoolListTable">
        <thead>

                <th>学校代码</th>
                <th>学校名称</th>
                <th>学校预估线(校方评估)</th>
                <th>学校预估线(算法评估)</th>
                <th>学校类型</th>
                <th>学校级别</th>
                <th>学校区县</th>
                <th>学校地址</th>

        </thead>
        <tbody>
                {% for key,value in ByAverage_Select_withArea.items() %}
                <tr class="{{ key }}">
                    {% for info in value[:-3] %}
                    <td>{{ info }}</td>
                    {% endfor %}
                    <td><a href="https://uri.amap.com/marker?position={{value[-1]}},{{value[-2]}}&name={{value[1]}}&coordinate=gaode&callnative=0" target="_blank">{{value[-3]}}</a></td>
                </tr>
                {% endfor %}

        </tbody>
        </table>
    </div>
    <div class="table-container hidden" id="table-container-5">
    <table class="schoolListTable">
        <thead>

                <th>学校代码</th>
                <th>学校名称</th>
                <th>学校预估线(校方评估)</th>
                <th>学校预估线(算法评估)</th>
                <th>学校类型</th>
                <th>学校级别</th>
                <th>学校区县</th>
                <th>学校地址</th>

        </thead>
        <tbody>
            {% for key,value in ByAverage_withArea.items() %}
             {% for schools in value %}
            <tr class="{{ key }}">
                 {% for info in schools[:-3] %}
                    <td>{{ info }}</td>
                {% endfor %}
                <td><a href="https://uri.amap.com/marker?position={{schools[-1]}},{{schools[-2]}}&name={{schools[1]}}&coordinate=gaode&callnative=0" target="_blank">{{schools[-3]}}</a></td>
            </tr>
            {% endfor %}
           {% endfor %}
        </tbody>
        </table>
    </div>

    <!-- 弹窗 -->
    <div id="detail-popup" class="popup">
        <div class="popup-content">
            <span class="close-button">&times;</span>
            <table id="schoolInfo-table" style="width: 100%">
                <thead>
                <tr>
                    <th>学校名称</th>
                    <th>招生年份</th>
                    <th>最低分数</th>
                    <th>当年普高线</th>
                    <th>定转统分数</th>
                </tr>
                </thead>
                <tbody id="schoolInfo-tbody">
                <!-- 这里放表格内容 -->
                </tbody>
            </table>
        </div>
    </div>
</div>
<script src="{{ url_for('static', filename='js/showSchool.js') }}"> </script>



{% endblock %}
